#ifndef IDCARDOCR_H
#define IDCARDOCR_H

#include <QThread>
#include <qt_windows.h>
#include <QPixmap>
#include "commondefine.h"
/**
 * @brief The IdCardOcr class
 * 中安护照识别ocr
 * 参照证件识别SDK开发手册
 */
class IdCardOcr : public QThread
{
    Q_OBJECT
public:
    explicit IdCardOcr(QObject *parent = 0);
    ~IdCardOcr();

    void GetRecogCondition();
    void GetContent();

    int InitCardDll();
    void FreeCardDll();
    void ReadCard();
protected:
    void run();

signals:
    void sigIdcardInfo(ST_ID_INFO& stIdInfo, QPixmap pixMap);

private:
    HINSTANCE m_hIDCard;
    bool m_bStop;
    bool m_bInitSuccess;
    int m_nIDNum;
    int m_nMainID; // 2二代身份证正面 3二代身份证反面 5驾照 13护照
    int m_nCardType;//1.带芯片 2.普通MRZ证件 3.不含MRZ证件
    int m_bVIZ;    // 表示是否识别视读区相关内容
    UINT m_ReadDGFlag; //识别的数据类型
    UINT m_SaveImageFlag; //保存的图片类型
    ST_ID_INFO m_stInfo;
};

#endif // IDCARDOCR_H
